package com.iamback.dy.mapper;

import java.util.List;
import java.util.Map;

import org.springframework.data.domain.Page;

import com.iamback.dy.entity.ResourceRole;
import com.iamback.dy.entity.Role;


public interface RoleMapper {

	
	
	 List<Role> findRoleByPage(Map<String, Object> map);
	 Integer findRoleByPageCount(Map<String, Object> map);
	
	/**
	 * 角色列表
	 * @param map
	 * @return
	 */
	List<Role> findRole(Map<String, Object> map);
	
	
	
	/**
	 * 根据ID查询角色
	 * @param id
	 * @return
	 */
	Role findRoleById(Integer id);
	/**
	 * 添加或者修改角色
	 * @param role
	 */
	void updateRole(Role role);

	void saveRole(Role role);
	
	void deleteRole(Integer id);
	
	List<Role> getListByUserId(Integer userId);

	/**
	 * 绑定资源
	 * @param map
	 */
	public void saveResourceRole(List<ResourceRole> list);
	public void deleteResourceRole(Map<String, Object> map);
	
	
	
}
